package cn.edu.cqut.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author cqut-917371
 * @since 2020-06-24
 */
public class Orders extends Model<Orders> {

    private static final long serialVersionUID=1L;

    /**
     * 订单编号
     */
    @TableId(value = "or_no", type = IdType.AUTO)
    private Integer orNo;

    /**
     * 购买商品名称
     */
    private String orProductname;

    /**
     * 商品数量
     */
    private Integer orProductnumber;

    /**
     * 商品价格
     */
    private BigDecimal orProductprice;

    /**
     * 订单总金额
     */
    @TableField("or_totalPrice")
    private BigDecimal orTotalPrice;

    /**
     * 下单时间
     */
    @DateTimeFormat(pattern = "yyyy")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date orDate;

    /**
     * 订单状态：0已完成
     */
    private Integer orState;

    /**
     * 客户编号
     */
    private Integer cusNo;

    /**
     * 客户名称
     */
    @TableField("cus_Name")
    private String cusName;
    
    public String getCusName() {
        return cusName;
    }

    public void setCusName(String cusName) {
        this.cusName = cusName;
    }
    
    public Integer getOrNo() {
        return orNo;
    }

    public void setOrNo(Integer orNo) {
        this.orNo = orNo;
    }

    public String getOrProductname() {
        return orProductname;
    }

    public void setOrProductname(String orProductname) {
        this.orProductname = orProductname;
    }

    public Integer getOrProductnumber() {
        return orProductnumber;
    }

    public void setOrProductnumber(Integer orProductnumber) {
        this.orProductnumber = orProductnumber;
    }

    public BigDecimal getOrProductprice() {
        return orProductprice;
    }

    public void setOrProductprice(BigDecimal orProductprice) {
        this.orProductprice = orProductprice;
    }

    public BigDecimal getOrTotalPrice() {
        return orTotalPrice;
    }

    public void setOrTotalPrice(BigDecimal orTotalPrice) {
    	this.orTotalPrice = orTotalPrice;
    }

    public Date getOrDate() {
        return orDate;
    }

    public void setOrDate(Date orDate) {
        this.orDate = orDate;
    }

    public Integer getOrState() {
        return orState;
    }

    public void setOrState(Integer orState) {
        this.orState = orState;
    }

    public Integer getCusNo() {
        return cusNo;
    }

    public void setCusNo(Integer cusNo) {
        this.cusNo = cusNo;
    }

    @Override
    protected Serializable pkVal() {
        return this.orNo;
    }

    @Override
    public String toString() {
        return "Orders{" +
        "orNo=" + orNo +
        ", cusName=" + cusName +
        ", orProductname=" + orProductname +
        ", orProductnumber=" + orProductnumber +
        ", orProductprice=" + orProductprice +
        ", orTotalprice=" + orTotalPrice +
        ", orDate=" + orDate +
        ", orState=" + orState +
        ", cusNo=" + cusNo +
        "}";
    }
}
